package database;

import java.util.ArrayList;

public class RecordList extends ArrayList<Record> {

	public void add(RecordList recordList) {
		for (Record r : recordList) {
			add(r);
		}
	}

	public Record getByID(int id) {
		for (Record record : this) {
			if (record.id == id)
				return record;
		}
		return null;
	}

	public boolean removeByID(int id) {
		for (Record record : this) {
			if (record.id == id) {
				record.pendingRemoval();
				return remove(record);
			}
		}
		return false;
	}

}
